class HomeController < ApplicationController
  before_action :authenticate_user!

  def index
    page = params[:page] || 1
    per = params[:per] || 20
    @posts = Post.all.page(page).per(per)
  end
end
